from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse

from love_home.utils.response_code import RET


class LoginRequiredJSONMixin(LoginRequiredMixin):
    def handle_no_permission(self):
        return JsonResponse({'errno':RET.SESSIONERR, 'errmsg':'未登录'})
